package com.higgins.eventtracking.client;

import java.util.Date;
import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.higgins.eventtracking.client.dto.ChartDataDTO;
import com.higgins.eventtracking.client.dto.DynamicTypeDTO;
import com.higgins.eventtracking.client.dto.FinanceStatsDTO;
import com.higgins.eventtracking.client.dto.TransactionDTO;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("financeTracking")
public interface FinanceTrackingService extends RemoteService {
	String insertTransaction(TransactionDTO dto) throws IllegalArgumentException;
	List<TransactionDTO> retrieveTransactions(Date now, Boolean weekOrMonth);
	List<TransactionDTO> retrieveTransactions(Integer weekInPast, Boolean weekOrMonth);
	//	FinanceStatsDTO retrieveFinanceStats() throws IllegalArgumentException;
	ChartDataDTO retrieveFinanceSavingsData(Integer points) throws IllegalArgumentException;
	ChartDataDTO retrieveFinanceGoalsData(Integer points) throws IllegalArgumentException;
	ChartDataDTO retrieveFinanceChartData(Boolean weeklyChart, Boolean yearlyExpense, Integer points)	throws IllegalArgumentException;
	ChartDataDTO retrieveFinanceBreakdownChartData(Boolean weeklyChart, Boolean yearlyExpense, Integer offset, Integer points)	throws IllegalArgumentException;
	Double retrieveTotalSpentThisWeek(Date now, Boolean yearlyExpense) throws IllegalArgumentException, SecurityAccessDeniedException;
	Double retrieveTotalSpentThisMonth(Date now, Boolean yearlyExpense) throws IllegalArgumentException, SecurityAccessDeniedException;
	Double retrieveForecastSpendThisWeek(Date now, Boolean yearlyExpense) throws IllegalArgumentException, SecurityAccessDeniedException;
	Double retrieveForecastSpendThisMonth(Date now, Boolean yearlyExpense) throws IllegalArgumentException, SecurityAccessDeniedException;
	Double retrieveAverageWeeklySpend(Date now, Boolean yearlyExpense) throws IllegalArgumentException, SecurityAccessDeniedException;
	Double retrieveForecastSavingsThisMonth(Date now, Boolean yearlyExpense) throws IllegalArgumentException, SecurityAccessDeniedException;
	String retrieveWeekNumber(Date now) throws IllegalArgumentException, SecurityAccessDeniedException;
	String updateTransaction(TransactionDTO dto) throws IllegalArgumentException, SecurityAccessDeniedException;	
	String deleteTransaction(Long id) throws IllegalArgumentException, SecurityAccessDeniedException;
	List<DynamicTypeDTO> retrieveDynamicTypes(String category) throws IllegalArgumentException, SecurityAccessDeniedException;
	String updateDynamicType(DynamicTypeDTO dto) throws IllegalArgumentException, SecurityAccessDeniedException;
}
